package com.example.mybatis.mapper;

import com.example.mybatis.model.ArticleInfo;
import com.example.mybatis.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 25228
 * Date: 2025-06-01
 * Time: 18:55
 */
@Mapper
public interface ArticleMapper {
    @Select("SELECT ta.*,tb.username,tb.age,tb.gender" +
            " FROM article_info ta " +
            " LEFT JOIN user_info tb ON ta.uid = tb.id" +
            " WHERE ta.id=#{id}")
    ArticleInfo selectById(Integer id);
}
